package Controller;

import Model.Test;
import Service.TestService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Controller
@RequestMapping("/test")
public class TestController {
    @Autowired
    private TestService testService;

    /**
     * pc管理后台数据测试
     * @return
     */
    @RequestMapping(value = "/user")
    @ResponseBody
    public List<Test> getTest(){
        List<Test> user = testService.test();
        System.out.print("测试数据输出：id:"+user);
        return user;
    }

    /**
     * 微信小程序数据测试
     * @return
     */
    @RequestMapping(value="/xiaochenxu/getUser")
    @ResponseBody
    public List<Test> getUser(){
        List<Test> user = testService.test();
        System.out.print("测试数据输出：id:"+user);
        return user;
    }
}
